A computing device may display content, such as images and/or text, on a video display to one or more human users. To this end, the computing device may perform a rendering process for calculating pixel values from the content—the pixel values, which may be organized in a memory region called an image plane, may be used by the video display to display the content.
Content to be displayed may comprise various elements, termed “primitives.” Examples of primitives include line segments, curves, glyphs, windows, buttons, and/or shapes such as circles and polygons. As such, rendering may be implemented on a “pixel-by-pixel” or on a “primitive-by-primitive” basis. Pixel-by-pixel rendering may involve iterating over image plane pixels and determining each of their values in turn. On the other hand, primitive-by-primitive rendering may involve iterating over primitives in the content to be displayed and, for each such primitive, determining which image plane pixel values may be affected by the primitive, and modifying those pixel values accordingly.
Some computing devices may have specialized hardware, such as video cards and/or graphics processing units, which may be used to perform one or more types of operations as part of a rendering process. For example, a graphics processing unit (GPU) may be used to calculate one or more image plane pixel values. These computing devices may provide software applications, which may generate content to display, access to such specialized hardware, for example, through a suitable application programming interface (e.g., a graphics library, a hardware driver, etc.).
Some GPUs support tile-based rendering. Such GPUs may have a fast on-chip memory smaller than the memory used for storing the rendered content (i.e., the image plane), and this on-chip memory may be used to perform certain GPU operations more quickly. Accordingly, in tile-based rendering, content may be rendered in portions, referred to as tiles, such that the GPU may perform operations on each such portion by using the fast memory as part of the rendering process. The content may be rendered one tile at a time, with pixel values being calculated on a per-tile basis. The memory region storing pixel values may be organized as multiple tiles. Accordingly, herein, each sub-region in which pixel values associated to a tile are stored is also referred to as a tile.
Some content may comprise one or more content layers. Each content layer may comprise one or more primitives and/or may comprise any other suitable content. In rendering the content layers, the information in each layer may be combined such that the rendered information represents a composite of the information in multiple layers. Content layers may be combined in different ways to achieve different effects. For example, one or more layers may be presented as if partially transparent such that portions of an underlying layer appear through an upper layer. As another example, the layers may be clipped such that what appears on the display are portions of one layer combined with portions of another layer. Content comprising multiple content layers may be rendered one layer at a time and within each layer one primitive at a time, using multiple passes over image plane pixel values.